Skip to content

refactor: migrate configuration system from JSON Schema to QuickType #1140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

fabiovincenzi
Copy link
Contributor

Replace JSON-Schema for config validation and default injection
Add typed config export, loadConfig(), validate() and setConfigFile()
Update index.ts to use the new loader and pass the validated config.


Note: Restored from deleted fork

This PR recreates the original PR #998, which was automatically closed due to accidental fork deletion.

** For discussions and reviews:** See the original PR #998

All commits are identical to the original with preserved git history.

Copy link

netlify bot commented Aug 4, 2025

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit b96ee9f
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/689d9ae15a914a0007a13d03

Copy link

codecov bot commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 80.75314% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.79%. Comparing base (aaea93a) to head (b96ee9f).

Files with missing lines Patch % Lines
src/config/index.ts 82.03% 7 Missing and 16 partials ⚠️
src/config/generated/config.ts 80.00% 13 Missing and 4 partials ⚠️
src/config/ConfigLoader.ts 87.50% 0 Missing and 2 partials ⚠️
src/proxy/index.ts 0.00% 0 Missing and 2 partials ⚠️
src/db/index.ts 66.66% 0 Missing and 1 partial ⚠️
src/proxy/routes/index.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1140      +/-   ##
==========================================
+ Coverage   83.29%   84.79%   +1.49%     
==========================================
  Files          59       60       +1     
  Lines        2449     2539      +90     
  Branches      280      313      +33     
==========================================
+ Hits         2040     2153     +113     
+ Misses        365      330      -35     
- Partials       44       56      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor]: Improve configuration loading
2 participants